home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
Info channel v3.1.adf
/
ARexx
/
ARexx.doc
< prev
next >
Wrap
Text File
|
1991-07-19
|
14KB
|
494 lines
InfoChannel ARexx documentation
-------------------------------
With InfoChannel version 3.1, you can control the InfoPlayer directly
via an ARexx message port. The InfoPlayer can thus be used as a
"graphics engine" or "output device" by other programs, whether it be
ARexx programs or programs written in other languages. For instance,
the ARexx directory on th InfoChannel program disk file contains a
sample ARexx program that displays a list of all files in a directory
(like the CLI "DIR" command), using a InfoChannel Background,
InfoChannel Fonts, and InfoChannel text transitions.
To use InfoChannel via ARexx, the player needs to be started in a
special ARexx mode. Please make sure that the InfoChannel main program
is not running.
Issue the following CLI command:
run InfoPlayer -arexx
The port name to use is:
rexx_VISUAL
that is, you need to issue the ARexx command
address 'rexx_VISUAL'
before you send ARexx commands to InfoPlayer.
The InfoPlayer Arexx commands
------------------------------
The ARexx commands supported by InfoPlayer are very similiar to the
commands in InfoChannel's own scripting language, VISUAL. Typically,
you would want to create nice-looking screens for your ARexx
application. This is easy to do in InfoChannel. Once you have designed
the pages, you may save them as a normal InfoChannel script, and
translate the script to ARexx. For instance, you could have each page
as a ARexx subroutine, and call the subroutines from your program.
The main difference between ARexx programs and VISUAL scripts is that
ARexx is an interpreted language, while VISUAL is compiled to an
internal format when you load the script. VISUAL scripts describe
events and their interconnections, while ARexx programs cause some
immediate action to be taken each time a command is executed. Therfore,
there is no EVENT...END command in ARexx. The following example
illustrates how to display a page of text with ARexx:
address 'rexx_VISUAL' /* Name of InfoPlayers ARexx port */
BLANK 640 512 3 lace hires 7 /* Use a blank picture */
PALETTE 000 FFE 06D 287 223 A00 C52 334 /* Choose color palette */
FONT "GoudyB.font" 48 /* Typeface */
COLOR 6 0 4 2 3 0 0 /* Text colors */
ATTRIBUTES shadow /* Text attributes */
STYLE 0 3 4 3 6 2 1 37 5 1 20 0 5 /* Text style parameters */
TEXT 30 30 '"Welcome to InfoChannel!"' 33 0 2 /* Display text with wipe #33 */
FONT "GoudyB.font" 23 /* Use smalle font size */
COLOR 1 0 4 2 3 0 0
STYLE 0 3 4 3 6 2 1 19 3 1 20 0 5
ATTRIBUTES italics
TEXT 30 111 '"What is InfoChannel?"'
ATTRIBUTES none
TEXT 30 167 '"InfoChannel is used for video titling"'
TEXT 30 195 '"and presentations, as well as interactive"'
TEXT 30 223 '"and educational applications."'
TEXT 30 279 '"InfoChannel is used by professionals like teachers,"'
TEXT 30 307 '"presenters and video producers because it"'
TEXT 30 335 '"is the fastest graphics display engine on the "'
TEXT 30 363 '"Amiga. It''s elegant user interface makes it"'
TEXT 30 391 '"quick, fun and easy to create powerful"'
TEXT 30 419 '"presentations. "'
/* At this point, the page is set up and ready to be displayed.
However, nothing is displayed until a SHOW commando is issued: */
SHOW
PAUSE 3 /* Show the picture for 3 seconds */
SHOW OFF /* SHOW OFF removes the picture */
/* The following command will quit the InfoPlayer. It is not
possible to send ARexx commands to InfoPlayer after the QUIT
command */
QUIT
For more examples of how to control InfoPlayer via ARexx, see the ARexx
directory on the InfoChannel program disk.
Alphabetical list of commands
-----------------------------
3D ON | OFF [DIR num] [LENGTH num]
The 3D command controls the 3D attribute for texts.
Examples:
3D ON /* Switch on 3D */
3D OFF /* Switch off 3D */
3D DIR 2 /* Set 3D direction */
3D LENGTH 6 /* Set 3D length */
The 3D command can also be used to read the current 3D setting.
3DCOLOR num num
The 3DCOLOR command sets or reads the colors used for
the 3D text attribute
Example:
3DCOLOR 2 3 /* Use color #2 and 3 for 3D */
ANIM name loops speed
The ANIM command controls playback of animation files.
Playback starts when the SHOW command is issued.
Example:
AMIM Work:Animations/InfoChannel.anim
AACOLOR color
The AACOLOR command defines which color to antialias to.
This color can be any RGB value (see the PALETTE command
below for an explanation of RGB values).
Example:
AACOLOR 000 /* Antialias to black */
AACOLOR 777 /* Antialias to gray */
ANTIALIAS level
The ANTIALIAS command sets or read the ANTIALIAS LEVEL
for texts and brushes. Level 0 is no antialiasing,
and level 1, 2 and 3 use 1, 2 adn 3 colors for antialiasing,
respectively.
Example:
ANTIALIAS 3
ATTRIBUTES NONE | UNDERLINE | BOLD | ITALICS | 3D | SHADOW | EDGE
| TEXTURE | STRECH | EMBOSS | JAMTRANS | ANTIALIAS
| REMAP
The ATTRIBUTES command sets or reads which text attributes
are to be used by the TEXT and BRUSH commands.
Examples:
ATTRIBUTES Italics
ATTRIBUTES Shadow Edge
ATTRIBUTES Underline 3d
ATTRIBUTES none
BLANK width height depth HIRES | LACE [backcolor]
The BLANK command defines a blank background to be used
for texting. The background is not displayed until
a SHOW command is issued.
Examples:
BLANK 640 512 4 hires lace 0 /* Hires interl. PAL, 16 colors */
BLANK 320 200 5 3 /* Lores NTSC, 32 colors, backgr.col. #3 */
BOLD ON | OFF [size]
The BOLD command controls the BOLD attribute for texts.
Examples:
BOLD ON /* Switch on BOLD */
BOLD OFF /* Switch off BOLD */
BOLD 2 /* Set BOLD size*/
The BOLD command can also be used to read the current bold
setting.
BRUSH x y filename [wipe pause speed] [FIRST | LAST]
The BRUSH command defines an IFF brush file to be displayed.
The X and Y parameters specify the position on the screen.
Optionally, you may specify a wipe number, wipe speed and
pause for the brush. Refer to the VISUAL section in the
manual for a complete list of wipe numbers. The LAST flag
allows you to make the brush appear on the last frame of
an animation.
Examples:
BRUSH 100 50 work:symbols/logo
BRUSH 100 50 work:symbols/logo 22 0 5
BRUSH 100 50 work:symbols/logo 22 0 5 LAST
BUTTON num x1 y1 x2 y2 NONE | COMPLEMENT
The BUTTON command lets you define areas on the screen
that can be selected with the mouse or a joystick, just
like InfoChannel's interactive buttons. You can have up to
99 buttons on one page, with optional highlighting.
The 'num' parameter is a unique number from 1-99 of your
choice to identify this button. X1, Y1, X2, Y2 define the
top left corner and right bottom corner of the button area
on the screen. The COMPLEMENT flag selects complement
highlighting.
Examples:
BUTTON 1 100 50 10 70 complement
BUTTON 16 100 50 10 70 none
To actually use the buttons, you need to enable either
mouse or joystick input with "MOUSE on" or "JOYSTICK on".
You can get the number of the last selected button by issuing
a BUTTON command with no parameters.
COLOR text edge shadow 3D1 3d2 jam inactive
The COLOR command combines the TEXTCOLOR, EDGECOLOR, 3DCOLOR,
and INACTIVECOLOR comands into one command.
Example:
COLOR 1 0 0 7 8 0 2
CYCLE ON | OFF
Enable or disable color cycling on a picture.
Example:
CYCLE on
EDGE ON | OFF [size]
The EDGE command controls the outline attribute for texts.
Examples:
EDGE ON /* Switch on outline*/
EDGE OFF /* Switch off outline*/
EDGE 2 /* Set outline size*/
The EDGE command can also be used to read the current outline
setting.
EDGECOLOR num
The EDGECOLOR command sets or reads the color used for
the EDGE (outline) text attribute
Example:
EDGECOLOR 2 /* Use color #2 for outline */
FONT name size
The FONT command selects a typeface for text output.
Example:
FONT Gill.font 96
INACTIVE ON | OFF
The INACTIVE command controls the INACTIVE attribute for texts.
Examples:
INACTIVE ON /* Switch on INACTIVE */
INACTIVE OFF /* Switch off INACTIVE */
The INACTIVE command can also be used to read the current
inactive setting.
INACTIVECOLOR num
The INACTIVECOLOR command sets or reads the color used for
the INACTIVE text attribute
Example:
INACTIVECOLOR 2 /* Use color #2 for inactive */
ITALICS ON | OFF [level]
The ITALICS command controls the ITALICS attribute for texts.
Examples:
ITALICS ON /* Switch on ITALICS */
ITALICS OFF /* Switch off ITALICS */
ITALICS 2 /* Set ITALICS size*/
The ITALICS command can also be used to read the current italics
setting.
JOYSTICK ON | OFF
The JOYSTICK command enables or disables a joystick in port 2
for controlling buttons.
MOUSE ON | OFF
The MOUSE command enables or disables the mouse for controlling
buttons.
PALETTE color1 ... colorN
Set color palette for a picture. The colors are defined by
three-digit hexadecimal numbers. The first digit is the RED
component, the second is GREEN and the third is BLUE.
Example:
PALETTE 000 fff bbb 777 222 fc2 00c 123
PAUSE seconds
Wait for a number of seconds.
Example:
PAUSE 5
PICTURE filename
Select an IFF picture file for background. The picture is not
displayed until a SHOW command is issued.
Example:
PICTURE work:InfoChannel/backgrounds/Texture001
QUIT
The QUIT command quits the InfoPlayer; the current screen
(if any) will be closed, and the ARexx message port is removed.
REMAP ON | OFF
The REMAP command sets or reads the REMAP attribute for
texts and brushes. Color remapping is used for color fonts and
brushes.
SHADOW ON | OFF [DIR num] [LENGTH num]
The SHADOW command controls the SHADOW attribute for texts.
Examples:
SHADOW ON /* Switch on SHADOW */
SHADOW OFF /* Switch off SHADOW */
SHADOW DIR 2 /* Set SHADOW direction */
SHADOW LENGTH 6 /* Set SHADOW length */
The SHADOW command can also be used to read the current SHADOW
setting.
SHADOWCOLOR num
The SHADOWCOLOR command sets or reads the color used for
the SHADOW text attribute
Example:
SHADOWCOLOR 0 /* Use color #0 for SHADOW */
SHOW [OFF]
The SHOW command displays a page that has previously been
set up with background, text, transitions etc. SHOW OFF
closes the current screen.
SPACING num
The SPACING commands sets or reads character spacing.
Example:
SPACING 2
STYLE dummy shadow_dir shadow_len 3d_dir 3d_len edge_size
bold_size under_pos under_size under_air italics spacing
The STYLE command lets you set or read text rendering
parameters.
Example:
STYLE 0 3 4 3 6 2 1 19 3 1 20 0 5
TEXT x y text [wipe pause speed] [FIRST | LAST]
The TEXT command defines a text to be displayed.
The X and Y parameters specify the position on the screen.
Optionally, you may specify a wipe number, wipe speed and
pause for the text. Refer to the VISUAL section in the
manual for a complete list of wipe numbers. The LAST flag
allows you to make the brush appear on the last frame of
an animation.
Examples:
TEXT 100 50 Text
TEXT 100 50 '"This is some text"' 22 0 5
TEXT 100 50 '"This is some text"' 22 0 5 LAST
TEXTCOLOR num
The TEXTCOLOR command sets or reads the front color used for
text.
Example:
TEXTCOLOR 1 /* Use color #1 for text */
UNDERLINE ON | OFF [POS num] [SIZE num] [AIR num]
The UNDERLINE command controls the UNDERLINE attribute for texts.
Examples:
UNDERLINE ON /* Switch on UNDERLINE */
UNDERLINE OFF /* Switch off UNDERLINE */
UNDERLINE POS 2 SIZE 4 /* Set UNDERLINE position & size*/
The UNDERLINE command can also be used to read the current
underline setting.
WIPE wipe speed
The wipe command specifies a transition for the picture.
This transition will be used when the next SHOW command is
executed. Refer to the VISUAL section in the manual for a
complete list of wipe numbers.
Examples:
WIPE 1 /* Cut */
WIPE 2 5 /* Fade with speed 5 */
Results
-------
The InfoPlayer sets the following ARexx variables:
RC -- Error level, 0 = no error.
SCALA.LASTERROR -- Error message if RC > 0
RESULT -- Return value (if "OPTIONS RESULTS" has been enabled)
Most commands return a result if they are issued with no arguments.
For instance, the BUTTON command with no arguments returns the number
of the last button pressed in RESULT.